package com.jinyuan.options.userinfo.service;

import org.apache.http.HttpStatus;
import org.json.JSONObject;

import android.os.Bundle;
import android.os.Message;

import com.android.threadpool.Task;
import com.jinyuan.utils.NetUtils;

/**
 *
 *
 * @author azuryleaves
 * @since 2014-1-6 下午3:51:31
 * @version 1.0
 *
 */
public class UserInfoService {
	
	public static JSONObject jsonObject;

	/**
	 * 个人信息
	 * @param task
	 * @param message
	 */
	public static void getUserInfo(Task task, Message message) {
		Bundle data = message.getData();
		if (jsonObject != null) {
			message.obj = jsonObject;
			data.putInt(NetUtils.StatusCode, HttpStatus.SC_OK);
		} else {
			data.putInt(NetUtils.StatusCode, HttpStatus.SC_FORBIDDEN);
			message.obj = null;
		}
		message.setData(data);
	}
	
}
